#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import resource_blueprint
from api_1_0.resourceResource.resourceResource import ResourceResource
from api_1_0.resourceResource.resourceOtherResource import ResourceOtherResource

api = Api(resource_blueprint)

api.add_resource(ResourceResource, '/resource/<resource_id>', '/resource', endpoint='Resource')


@resource_blueprint.route('/upload-resource', methods=['POST'], endpoint='UploadResource')
def upload_resource():
    return ResourceOtherResource.upload_resource()


@resource_blueprint.route('/look-resource', methods=['GET'], endpoint='LookResource')
def look_resource():
    return ResourceOtherResource.look_resource()

@resource_blueprint.route('/get-user-id', methods=['GET'], endpoint='GetId')
def get_id():
    return ResourceOtherResource.get_id()